package view.client;

import view.client.Console;
import model.Hearer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.DefaultListModel;
import javax.swing.JPanel;
import javax.swing.ListModel;
import controller.link.game.AddAtribute;
import controller.link.game.Ask4Challenge;
import controller.link.game.BuyItem;
import controller.link.game.ChangeLocation;
import controller.link.Chat;
import controller.link.Yell;
import controller.link.game.DropItem;
import controller.link.game.PickItem;
import controller.link.game.UseItem;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import javax.swing.DropMode;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.ListSelectionModel;
import javax.swing.TransferHandler;

public class PanelGame extends JPanel implements ActionListener, MouseListener {

    private Console console;
    private Hearer cliente;
    private Frame frame;
    private DefaultListModel modelPeople = new DefaultListModel();
    private DefaultListModel modelObject = new DefaultListModel();
    private DefaultListModel modelPlace = new DefaultListModel();
    private DefaultListModel modelItem = new DefaultListModel();

    public PanelGame(Hearer cliente, Frame frame) {
        this.console = new Console(frame, this, cliente);
        initPanel(cliente, frame, console);

    }

    public PanelGame(Hearer cliente, Frame frame, Console csl) {
        initPanel(cliente, frame, csl);
    }

    private void initPanel(Hearer cliente, Frame frame, Console csl) {
        initComponents();
        this.console = csl;
        this.frame = frame;
        this.cliente = cliente;
        frame.setDefaultButton(btnEnviar);
        btnEnviar.addActionListener(this);
        btnEnviar.setVisible(false);
        listAction.addMouseListener(this);
        listPlace.addMouseListener(this);
        listObject.addMouseListener(this);
        listInventory.addMouseListener(this);
        txtArea.setEditable(false);
        txtArea.setLineWrap(true);
        txtArea.setWrapStyleWord(true);
        btnStrength1.addActionListener(this);
        btnAgi1.addActionListener(this);
        btnApti1.addActionListener(this);
        btnFirePower1.addActionListener(this);
        btnIntel1.addActionListener(this);
        btnRes1.addActionListener(this);
        btnVig1.addActionListener(this);
        listObject.setTransferHandler(new DragAndDrop(TransferHandler.MOVE));
        listObject.setPrototypeCellValue("List Item WWWWWW");
        listObject.setDragEnabled(true);
        listObject.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        listObject.setDropMode(DropMode.INSERT);

        listInventory.setTransferHandler(new DragAndDrop(TransferHandler.MOVE));
        listInventory.setPrototypeCellValue("List Item WWWWWW");
        listInventory.setDragEnabled(true);
        listInventory.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        listInventory.setDropMode(DropMode.INSERT);
        jScrollPane1.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() {

            @Override
            public void adjustmentValueChanged(AdjustmentEvent e) {
                getTxtArea().select(getTxtArea().getHeight() + 10000, 0);
            }
        });
    }

    public Console getConsole() {
        return console;
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();
        jMenuBar2 = new javax.swing.JMenuBar();
        jMenu3 = new javax.swing.JMenu();
        jMenu4 = new javax.swing.JMenu();
        jMenuBar3 = new javax.swing.JMenuBar();
        jMenu5 = new javax.swing.JMenu();
        jMenu6 = new javax.swing.JMenu();
        jMenuBar4 = new javax.swing.JMenuBar();
        jMenu7 = new javax.swing.JMenu();
        jMenu8 = new javax.swing.JMenu();
        jMenuBar5 = new javax.swing.JMenuBar();
        jMenu9 = new javax.swing.JMenu();
        jMenu10 = new javax.swing.JMenu();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jTabbedPane3 = new javax.swing.JTabbedPane();
        jTabbedPane5 = new javax.swing.JTabbedPane();
        jTabbedPane6 = new javax.swing.JTabbedPane();
        jProgressBar1 = new javax.swing.JProgressBar();
        tabInfo = new javax.swing.JTabbedPane();
        panelChat = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        txtArea = new javax.swing.JTextArea();
        txtInput = new javax.swing.JTextField();
        panelEquip = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        panelAtributes = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        lblVida = new javax.swing.JLabel();
        lblEnergia = new javax.swing.JLabel();
        lblPoderDeFogo = new javax.swing.JLabel();
        lblAgilidade = new javax.swing.JLabel();
        lblResistencia = new javax.swing.JLabel();
        lblArmadura = new javax.swing.JLabel();
        lblAtributo = new javax.swing.JLabel();
        lblInteligencia = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        lblVigor = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        lblAptitude = new javax.swing.JLabel();
        lblForca = new javax.swing.JLabel();
        btnStrength1 = new javax.swing.JButton();
        btnFirePower1 = new javax.swing.JButton();
        btnIntel1 = new javax.swing.JButton();
        btnApti1 = new javax.swing.JButton();
        btnAgi1 = new javax.swing.JButton();
        btnRes1 = new javax.swing.JButton();
        btnVig1 = new javax.swing.JButton();
        panelSpell = new javax.swing.JPanel();
        panelDeck = new javax.swing.JPanel();
        panelLog = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtBattle = new javax.swing.JTextArea();
        jProgressBar2 = new javax.swing.JProgressBar();
        pbXp = new javax.swing.JProgressBar();
        jScrollPane2 = new javax.swing.JScrollPane();
        listAction = new javax.swing.JList();
        btnEnviar = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        lblName = new javax.swing.JLabel();
        pbVida = new javax.swing.JProgressBar();
        pbEnergia = new javax.swing.JProgressBar();
        lblEnergia2 = new javax.swing.JLabel();
        lblVida1 = new javax.swing.JLabel();
        lblLocal = new javax.swing.JLabel();
        lblOn = new javax.swing.JLabel();
        lblTotal = new javax.swing.JLabel();
        lblLevel = new javax.swing.JLabel();
        lblCoin = new javax.swing.JLabel();
        lblWeigth = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        listObject = new javax.swing.JList();
        jScrollPane6 = new javax.swing.JScrollPane();
        listInventory = new javax.swing.JList();
        jScrollPane7 = new javax.swing.JScrollPane();
        listPlace = new javax.swing.JList();

        jMenu1.setText("File");
        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edit");
        jMenuBar1.add(jMenu2);

        jMenu3.setText("File");
        jMenuBar2.add(jMenu3);

        jMenu4.setText("Edit");
        jMenuBar2.add(jMenu4);

        jMenu5.setText("File");
        jMenuBar3.add(jMenu5);

        jMenu6.setText("Edit");
        jMenuBar3.add(jMenu6);

        jMenu7.setText("File");
        jMenuBar4.add(jMenu7);

        jMenu8.setText("Edit");
        jMenuBar4.add(jMenu8);

        jMenu9.setText("File");
        jMenuBar5.add(jMenu9);

        jMenu10.setText("Edit");
        jMenuBar5.add(jMenu10);

        jTabbedPane1.addTab("tab1", jTabbedPane2);
        jTabbedPane1.addTab("tab2", jTabbedPane3);

        setBackground(new java.awt.Color(153, 153, 153));
        setForeground(new java.awt.Color(255, 255, 255));
        setPreferredSize(new java.awt.Dimension(400, 300));

        tabInfo.setBackground(new java.awt.Color(51, 51, 51));
        tabInfo.setTabPlacement(javax.swing.JTabbedPane.LEFT);
        tabInfo.setFont(new java.awt.Font("Tahoma", 0, 10));
        tabInfo.setOpaque(true);

        panelChat.setBackground(new java.awt.Color(51, 51, 51));

        txtArea.setBackground(new java.awt.Color(255, 204, 102));
        txtArea.setColumns(20);
        txtArea.setEditable(false);
        txtArea.setFont(new java.awt.Font("Tahoma", 0, 10));
        txtArea.setLineWrap(true);
        txtArea.setRows(5);
        txtArea.setBorder(null);
        jScrollPane1.setViewportView(txtArea);

        txtInput.setBackground(new java.awt.Color(102, 153, 255));

        javax.swing.GroupLayout panelChatLayout = new javax.swing.GroupLayout(panelChat);
        panelChat.setLayout(panelChatLayout);
        panelChatLayout.setHorizontalGroup(
            panelChatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelChatLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelChatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
                    .addComponent(txtInput, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE))
                .addContainerGap())
        );
        panelChatLayout.setVerticalGroup(
            panelChatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelChatLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        tabInfo.addTab("Chat", panelChat);

        panelEquip.setBackground(new java.awt.Color(51, 51, 51));

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("(Elmo)");

        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setText("(Armadura)");

        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("(Escudo)");

        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel4.setText("(Espada)");

        jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel16.setText("(Calça)");

        jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel17.setText("(Botas)");

        javax.swing.GroupLayout panelEquipLayout = new javax.swing.GroupLayout(panelEquip);
        panelEquip.setLayout(panelEquipLayout);
        panelEquipLayout.setHorizontalGroup(
            panelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelEquipLayout.createSequentialGroup()
                .addGroup(panelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelEquipLayout.createSequentialGroup()
                        .addGap(110, 110, 110)
                        .addGroup(panelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)
                            .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)
                            .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelEquipLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)
                        .addGap(104, 104, 104)
                        .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)))
                .addContainerGap())
        );
        panelEquipLayout.setVerticalGroup(
            panelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelEquipLayout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(jLabel1)
                .addGap(37, 37, 37)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4))
                .addGap(18, 18, 18)
                .addComponent(jLabel16)
                .addGap(28, 28, 28)
                .addComponent(jLabel17)
                .addContainerGap(62, Short.MAX_VALUE))
        );

        tabInfo.addTab("Equipamentos", panelEquip);

        panelAtributes.setBackground(new java.awt.Color(51, 51, 51));

        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setText("Atributos");

        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setText("Vida");

        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setText("Energia");

        jLabel8.setForeground(new java.awt.Color(255, 255, 255));
        jLabel8.setText("Força");

        jLabel9.setForeground(new java.awt.Color(255, 255, 255));
        jLabel9.setText("Poder de Fogo");

        jLabel10.setForeground(new java.awt.Color(255, 255, 255));
        jLabel10.setText("Agilidade");

        jLabel11.setForeground(new java.awt.Color(255, 255, 255));
        jLabel11.setText("Resistencia");

        jLabel12.setForeground(new java.awt.Color(255, 255, 255));
        jLabel12.setText("Armadura");

        lblVida.setForeground(new java.awt.Color(255, 255, 255));
        lblVida.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblVida.setText("10");

        lblEnergia.setForeground(new java.awt.Color(255, 255, 255));
        lblEnergia.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblEnergia.setText("10");

        lblPoderDeFogo.setForeground(new java.awt.Color(255, 255, 255));
        lblPoderDeFogo.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblPoderDeFogo.setText("10");

        lblAgilidade.setForeground(new java.awt.Color(255, 255, 255));
        lblAgilidade.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblAgilidade.setText("10");

        lblResistencia.setForeground(new java.awt.Color(255, 255, 255));
        lblResistencia.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblResistencia.setText("10");

        lblArmadura.setForeground(new java.awt.Color(255, 255, 255));
        lblArmadura.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblArmadura.setText("10");

        lblAtributo.setForeground(new java.awt.Color(255, 255, 255));
        lblAtributo.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblAtributo.setText("0/10");

        lblInteligencia.setForeground(new java.awt.Color(255, 255, 255));
        lblInteligencia.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblInteligencia.setText("10");

        jLabel13.setForeground(new java.awt.Color(255, 255, 255));
        jLabel13.setText("Inteligência");

        jLabel14.setForeground(new java.awt.Color(255, 255, 255));
        jLabel14.setText("Vigor");

        lblVigor.setForeground(new java.awt.Color(255, 255, 255));
        lblVigor.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblVigor.setText("10");

        jLabel15.setForeground(new java.awt.Color(255, 255, 255));
        jLabel15.setText("Aptidão");

        lblAptitude.setForeground(new java.awt.Color(255, 255, 255));
        lblAptitude.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblAptitude.setText("10");

        lblForca.setForeground(new java.awt.Color(255, 255, 255));
        lblForca.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblForca.setText("10");

        btnStrength1.setFont(new java.awt.Font("Tahoma", 0, 8));
        btnStrength1.setText("+");
        btnStrength1.setAlignmentY(0.0F);
        btnStrength1.setMargin(new java.awt.Insets(0, 0, 0, 0));

        btnFirePower1.setFont(new java.awt.Font("Tahoma", 0, 8));
        btnFirePower1.setText("+");
        btnFirePower1.setAlignmentY(0.0F);
        btnFirePower1.setMargin(new java.awt.Insets(0, 0, 0, 0));

        btnIntel1.setFont(new java.awt.Font("Tahoma", 0, 8));
        btnIntel1.setText("+");
        btnIntel1.setAlignmentY(0.0F);
        btnIntel1.setMargin(new java.awt.Insets(0, 0, 0, 0));

        btnApti1.setFont(new java.awt.Font("Tahoma", 0, 8));
        btnApti1.setText("+");
        btnApti1.setAlignmentY(0.0F);
        btnApti1.setMargin(new java.awt.Insets(0, 0, 0, 0));

        btnAgi1.setFont(new java.awt.Font("Tahoma", 0, 8));
        btnAgi1.setText("+");
        btnAgi1.setAlignmentY(0.0F);
        btnAgi1.setMargin(new java.awt.Insets(0, 0, 0, 0));

        btnRes1.setFont(new java.awt.Font("Tahoma", 0, 8));
        btnRes1.setText("+");
        btnRes1.setAlignmentY(0.0F);
        btnRes1.setMargin(new java.awt.Insets(0, 0, 0, 0));

        btnVig1.setFont(new java.awt.Font("Tahoma", 0, 8));
        btnVig1.setText("+");
        btnVig1.setAlignmentY(0.0F);
        btnVig1.setMargin(new java.awt.Insets(0, 0, 0, 0));

        javax.swing.GroupLayout panelAtributesLayout = new javax.swing.GroupLayout(panelAtributes);
        panelAtributes.setLayout(panelAtributesLayout);
        panelAtributesLayout.setHorizontalGroup(
            panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelAtributesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel12)
                    .addComponent(jLabel14)
                    .addComponent(jLabel11)
                    .addComponent(jLabel10)
                    .addComponent(jLabel9)
                    .addComponent(jLabel13)
                    .addComponent(jLabel8)
                    .addComponent(jLabel15)
                    .addComponent(jLabel7)
                    .addComponent(jLabel6)
                    .addComponent(jLabel5))
                .addGap(36, 36, 36)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblArmadura, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(panelAtributesLayout.createSequentialGroup()
                        .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(lblVida, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblPoderDeFogo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblEnergia, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblForca, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                            .addComponent(lblInteligencia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblAptitude, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblAgilidade, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblResistencia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblVigor, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnVig1)
                            .addComponent(btnRes1)
                            .addComponent(btnAgi1)
                            .addComponent(btnApti1)
                            .addComponent(btnIntel1)
                            .addComponent(btnFirePower1)
                            .addComponent(btnStrength1)))
                    .addComponent(lblAtributo))
                .addContainerGap(162, Short.MAX_VALUE))
        );
        panelAtributesLayout.setVerticalGroup(
            panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelAtributesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(lblAtributo))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(lblVida))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEnergia)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(lblForca)
                    .addComponent(btnStrength1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(lblPoderDeFogo)
                    .addComponent(btnFirePower1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(lblInteligencia)
                    .addComponent(btnIntel1))
                .addGap(4, 4, 4)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(lblAptitude)
                    .addComponent(btnApti1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(lblAgilidade)
                    .addComponent(btnAgi1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(lblResistencia)
                    .addComponent(btnRes1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(lblVigor)
                    .addComponent(btnVig1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAtributesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(lblArmadura))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tabInfo.addTab("Atributos", panelAtributes);

        panelSpell.setBackground(new java.awt.Color(51, 51, 51));

        javax.swing.GroupLayout panelSpellLayout = new javax.swing.GroupLayout(panelSpell);
        panelSpell.setLayout(panelSpellLayout);
        panelSpellLayout.setHorizontalGroup(
            panelSpellLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 322, Short.MAX_VALUE)
        );
        panelSpellLayout.setVerticalGroup(
            panelSpellLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 248, Short.MAX_VALUE)
        );

        tabInfo.addTab("Spellbook", panelSpell);

        panelDeck.setBackground(new java.awt.Color(51, 51, 51));

        javax.swing.GroupLayout panelDeckLayout = new javax.swing.GroupLayout(panelDeck);
        panelDeck.setLayout(panelDeckLayout);
        panelDeckLayout.setHorizontalGroup(
            panelDeckLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 322, Short.MAX_VALUE)
        );
        panelDeckLayout.setVerticalGroup(
            panelDeckLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 248, Short.MAX_VALUE)
        );

        tabInfo.addTab("Deck", panelDeck);

        panelLog.setBackground(new java.awt.Color(51, 51, 51));

        txtBattle.setBackground(new java.awt.Color(255, 204, 102));
        txtBattle.setColumns(20);
        txtBattle.setEditable(false);
        txtBattle.setLineWrap(true);
        txtBattle.setRows(5);
        txtBattle.setBorder(null);
        jScrollPane4.setViewportView(txtBattle);

        javax.swing.GroupLayout panelLogLayout = new javax.swing.GroupLayout(panelLog);
        panelLog.setLayout(panelLogLayout);
        panelLogLayout.setHorizontalGroup(
            panelLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 322, Short.MAX_VALUE)
            .addGroup(panelLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelLogLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        panelLogLayout.setVerticalGroup(
            panelLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 248, Short.MAX_VALUE)
            .addGroup(panelLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelLogLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)
                    .addContainerGap()))
        );

        tabInfo.addTab("Log Batalha", panelLog);

        listAction.setBackground(new java.awt.Color(51, 51, 51));
        listAction.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Pessoas", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 10), new java.awt.Color(255, 255, 255))); // NOI18N
        listAction.setFont(new java.awt.Font("Tahoma", 0, 10));
        listAction.setForeground(new java.awt.Color(255, 255, 255));
        listAction.setModel(modelPeople);
        jScrollPane2.setViewportView(listAction);

        btnEnviar.setText("Enviar");

        jPanel3.setBackground(new java.awt.Color(255, 204, 102));

        lblName.setFont(new java.awt.Font("Tahoma", 1, 12));
        lblName.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblName.setText("Nome");

        lblEnergia2.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblEnergia2.setText("Energia");

        lblVida1.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblVida1.setText("Vida");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblVida1, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
                    .addComponent(lblEnergia2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pbEnergia, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pbVida, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addComponent(lblName, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(lblName)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(pbVida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVida1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(pbEnergia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblEnergia2))
                .addContainerGap())
        );

        lblLocal.setFont(new java.awt.Font("Tahoma", 0, 18));
        lblLocal.setText("Local:");

        lblOn.setText("Players Online: 0");

        lblTotal.setText("Total Players: 0");

        lblLevel.setFont(new java.awt.Font("Tahoma", 0, 18));
        lblLevel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblLevel.setText("Level 1");

        lblCoin.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblCoin.setText("0 moedas");

        lblWeigth.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lblWeigth.setText("0/100 peso");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblLocal)
                    .addComponent(lblOn)
                    .addComponent(lblTotal))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblLevel, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCoin, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblWeigth, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(lblLevel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblCoin)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblWeigth))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(lblLocal)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblOn)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblTotal)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        listObject.setBackground(new java.awt.Color(51, 51, 51));
        listObject.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Objetos no Cenário", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 10), new java.awt.Color(255, 255, 255))); // NOI18N
        listObject.setFont(new java.awt.Font("Tahoma", 0, 10));
        listObject.setForeground(new java.awt.Color(255, 255, 255));
        listObject.setModel(modelObject);
        jScrollPane5.setViewportView(listObject);

        listInventory.setBackground(new java.awt.Color(51, 51, 51));
        listInventory.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Inventário", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 10), new java.awt.Color(255, 255, 255))); // NOI18N
        listInventory.setFont(new java.awt.Font("Tahoma", 0, 10));
        listInventory.setForeground(new java.awt.Color(255, 255, 255));
        listInventory.setModel(modelItem);
        jScrollPane6.setViewportView(listInventory);

        listPlace.setBackground(new java.awt.Color(51, 51, 51));
        listPlace.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Lugares Para Ir", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 10), new java.awt.Color(255, 255, 255))); // NOI18N
        listPlace.setFont(new java.awt.Font("Tahoma", 0, 10));
        listPlace.setForeground(new java.awt.Color(255, 255, 255));
        listPlace.setModel(modelPlace);
        jScrollPane7.setViewportView(listPlace);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(282, 282, 282)
                        .addComponent(btnEnviar, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(pbXp, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(tabInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 406, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                        .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(6, 6, 6)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                                    .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jProgressBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(12, 12, 12)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(51, 51, 51)
                        .addComponent(jProgressBar2, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jScrollPane2)
                            .addComponent(tabInfo))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                            .addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                            .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pbXp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnEnviar, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAgi1;
    private javax.swing.JButton btnApti1;
    private javax.swing.JButton btnEnviar;
    private javax.swing.JButton btnFirePower1;
    private javax.swing.JButton btnIntel1;
    private javax.swing.JButton btnRes1;
    private javax.swing.JButton btnStrength1;
    private javax.swing.JButton btnVig1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu10;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenu jMenu7;
    private javax.swing.JMenu jMenu8;
    private javax.swing.JMenu jMenu9;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuBar jMenuBar2;
    private javax.swing.JMenuBar jMenuBar3;
    private javax.swing.JMenuBar jMenuBar4;
    private javax.swing.JMenuBar jMenuBar5;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JProgressBar jProgressBar1;
    private javax.swing.JProgressBar jProgressBar2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTabbedPane jTabbedPane3;
    private javax.swing.JTabbedPane jTabbedPane5;
    private javax.swing.JTabbedPane jTabbedPane6;
    private javax.swing.JLabel lblAgilidade;
    private javax.swing.JLabel lblAptitude;
    private javax.swing.JLabel lblArmadura;
    private javax.swing.JLabel lblAtributo;
    private javax.swing.JLabel lblCoin;
    private javax.swing.JLabel lblEnergia;
    private javax.swing.JLabel lblEnergia2;
    private javax.swing.JLabel lblForca;
    private javax.swing.JLabel lblInteligencia;
    private javax.swing.JLabel lblLevel;
    private javax.swing.JLabel lblLocal;
    private javax.swing.JLabel lblName;
    private javax.swing.JLabel lblOn;
    private javax.swing.JLabel lblPoderDeFogo;
    private javax.swing.JLabel lblResistencia;
    private javax.swing.JLabel lblTotal;
    private javax.swing.JLabel lblVida;
    private javax.swing.JLabel lblVida1;
    private javax.swing.JLabel lblVigor;
    private javax.swing.JLabel lblWeigth;
    private javax.swing.JList listAction;
    private javax.swing.JList listInventory;
    private javax.swing.JList listObject;
    private javax.swing.JList listPlace;
    private javax.swing.JPanel panelAtributes;
    private javax.swing.JPanel panelChat;
    private javax.swing.JPanel panelDeck;
    private javax.swing.JPanel panelEquip;
    private javax.swing.JPanel panelLog;
    private javax.swing.JPanel panelSpell;
    private javax.swing.JProgressBar pbEnergia;
    private javax.swing.JProgressBar pbVida;
    private javax.swing.JProgressBar pbXp;
    private javax.swing.JTabbedPane tabInfo;
    private javax.swing.JTextArea txtArea;
    private javax.swing.JTextArea txtBattle;
    private javax.swing.JTextField txtInput;
    // End of variables declaration//GEN-END:variables

    @Override
    public void actionPerformed(ActionEvent arg0) {
        if (arg0.getSource().equals(getBtnEnviar())) {
            if (getTxtInput().getText() != null) {
                Yell yell = new Yell(cliente, getTxtInput().getText());
                if (!cliente.isRunning()) {
                    return;
                }
            }
            getTxtInput().setText("");
        }

        if (arg0.getSource().equals(getBtnAgi1())) {
            AddAtribute aa = new AddAtribute(cliente, "Agility");
        } else if (arg0.getSource().equals(getBtnApti1())) {
            AddAtribute aa = new AddAtribute(cliente, "Aptitude");
        } else if (arg0.getSource().equals(getBtnFirePower1())) {
            AddAtribute aa = new AddAtribute(cliente, "FirePower");
        } else if (arg0.getSource().equals(getBtnIntel1())) {
            AddAtribute aa = new AddAtribute(cliente, "Intelligence");
        } else if (arg0.getSource().equals(getBtnRes1())) {
            AddAtribute aa = new AddAtribute(cliente, "Resistence");
        } else if (arg0.getSource().equals(getBtnStrength1())) {
            AddAtribute aa = new AddAtribute(cliente, "Strength");
        } else if (arg0.getSource().equals(getBtnVig1())) {
            AddAtribute aa = new AddAtribute(cliente, "Vigor");
        }
    }

    public DefaultListModel getModelPeople() {
        return modelPeople;
    }

    public void disableAtrButtonsAdd() {
        getBtnStrength1().setEnabled(false);
        getBtnAgi1().setEnabled(false);
        getBtnApti1().setEnabled(false);
        getBtnFirePower1().setEnabled(false);
        getBtnIntel1().setEnabled(false);
        getBtnRes1().setEnabled(false);
        getBtnVig1().setEnabled(false);
    }

    public void enableAtrButtonsAdd() {
        getBtnStrength1().setEnabled(true);
        getBtnAgi1().setEnabled(true);
        getBtnApti1().setEnabled(true);
        getBtnFirePower1().setEnabled(true);
        getBtnIntel1().setEnabled(true);
        getBtnRes1().setEnabled(true);
        getBtnVig1().setEnabled(true);
    }

    public DefaultListModel getModelObject() {
        return modelObject;
    }

    public DefaultListModel getModelPlace() {
        return modelPlace;
    }

    public javax.swing.JButton getBtnEnviar() {
        return btnEnviar;
    }

    public javax.swing.JLabel getLblAgilidade() {
        return lblAgilidade;
    }

    public javax.swing.JLabel getLblArmadura() {
        return lblArmadura;
    }

    public javax.swing.JLabel getLblCoin() {
        return lblCoin;
    }

    public javax.swing.JLabel getLblEnergia() {
        return lblEnergia;
    }

    public javax.swing.JLabel getLblEnergia2() {
        return lblEnergia2;
    }

    public javax.swing.JLabel getLblForca() {
        return lblForca;
    }

    public javax.swing.JLabel getLblLocal() {
        return lblLocal;
    }

    public javax.swing.JLabel getLblName() {
        return lblName;
    }

    public javax.swing.JLabel getLblOn() {
        return lblOn;
    }

    public javax.swing.JLabel getLblPoderDeFogo() {
        return lblPoderDeFogo;
    }

    public javax.swing.JLabel getLblResistencia() {
        return lblResistencia;
    }

    public javax.swing.JLabel getLblTotal() {
        return lblTotal;
    }

    public javax.swing.JLabel getLblVida() {
        return lblVida;
    }

    public javax.swing.JLabel getLblVida1() {
        return lblVida1;
    }

    public javax.swing.JLabel getLblVida2() {
        return getLblAtributo();
    }

    public javax.swing.JLabel getLblWeigth() {
        return lblWeigth;
    }

    public javax.swing.JLabel getLblLevel() {
        return lblLevel;
    }

    public javax.swing.JList getListAction() {
        return listAction;
    }

    public javax.swing.JProgressBar getPbEnergia() {
        return pbEnergia;
    }

    public javax.swing.JProgressBar getPbVida() {
        return pbVida;
    }

    public javax.swing.JProgressBar getPbXp() {
        return pbXp;
    }

    public javax.swing.JTextArea getTxtArea() {
        return txtArea;
    }

    public javax.swing.JTextField getTxtInput() {
        return txtInput;
    }

    @Override
    public void mouseClicked(MouseEvent e) {
        if (e.getClickCount() == 2) {
            if (e.getSource().equals(listAction)) {
                if ((listAction.isEnabled()) && (listAction.getModel().getSize() > 0)) {
                    int index = getListAction().locationToIndex(e.getPoint());
                    ListModel dlm = getListAction().getModel();
                    Object item = dlm.getElementAt(index);
                    getListAction().ensureIndexIsVisible(index);
                    if (listAction.getModel().equals(modelPeople)) {
                        Ask4Challenge ac = new Ask4Challenge(cliente, item.toString());
                    }
                }
            } else if (e.getSource().equals(getListPlace())) {
                if ((getListPlace().isEnabled()) && (getListPlace().getModel().getSize() > 0)) {
                    int index = getListPlace().locationToIndex(e.getPoint());
                    ListModel dlm = getListPlace().getModel();
                    Object item = dlm.getElementAt(index);
                    getListPlace().ensureIndexIsVisible(index);
                    if (getListPlace().getModel().equals(modelPlace)) {
                        ChangeLocation cl = new ChangeLocation(cliente, item.toString());
                    }
                }
            } else if (e.getSource().equals(listInventory)) {
                if ((listInventory.isEnabled()) && (listInventory.getModel().getSize() > 0)) {
                    int index = listInventory.locationToIndex(e.getPoint());
                    ListModel dlm = listInventory.getModel();
                    Object item = dlm.getElementAt(index);
                    listInventory.ensureIndexIsVisible(index);
                    if (listInventory.getModel().equals(modelItem)) {
                        UseItem ui = new UseItem(cliente, item.toString());
                    }
                }
            }
        }
    }

    @Override
    public void mousePressed(MouseEvent e) {
    }

    @Override
    public void mouseReleased(MouseEvent e) {
    }

    @Override
    public void mouseEntered(MouseEvent e) {
    }

    @Override
    public void mouseExited(MouseEvent e) {
    }

    public Hearer getCliente() {
        return cliente;
    }

    public Frame getFrame() {
        return frame;
    }

    public javax.swing.JProgressBar getjProgressBar1() {
        return jProgressBar1;
    }

    public javax.swing.JProgressBar getjProgressBar2() {
        return jProgressBar2;
    }

    public javax.swing.JScrollPane getjScrollPane1() {
        return jScrollPane1;
    }

    public javax.swing.JScrollPane getjScrollPane2() {
        return jScrollPane2;
    }

    public javax.swing.JLabel getLblAptitude() {
        return lblAptitude;
    }

    public javax.swing.JLabel getLblAtributo() {
        return lblAtributo;
    }

    public javax.swing.JLabel getLblInteligencia() {
        return lblInteligencia;
    }

    public javax.swing.JLabel getLblVigor() {
        return lblVigor;
    }

    public DefaultListModel getModelItem() {
        return modelItem;
    }

    public void setModelItem(DefaultListModel modelItem) {
        this.modelItem = modelItem;
    }

    public javax.swing.JButton getBtnAgi1() {
        return btnAgi1;
    }

    public javax.swing.JButton getBtnApti1() {
        return btnApti1;
    }

    public javax.swing.JButton getBtnFirePower1() {
        return btnFirePower1;
    }

    public javax.swing.JButton getBtnIntel1() {
        return btnIntel1;
    }

    public javax.swing.JButton getBtnRes1() {
        return btnRes1;
    }

    public javax.swing.JButton getBtnStrength1() {
        return btnStrength1;
    }

    public javax.swing.JButton getBtnVig1() {
        return btnVig1;
    }

    public javax.swing.JTextArea getTxtBattle() {
        return txtBattle;
    }

    public javax.swing.JList getListObject() {
        return listObject;
    }

    public javax.swing.JList getListPlace() {
        return listPlace;
    }

    class DragAndDrop extends TransferHandler {

        int action;

        public DragAndDrop(int action) {
            this.action = action;
        }

        public boolean canImport(TransferHandler.TransferSupport support) {
            // for the demo, we'll only support drops (not clipboard paste)
            if (!support.isDrop()) {
                return false;
            }

            // we only import Strings
            if (!support.isDataFlavorSupported(DataFlavor.stringFlavor)) {
                return false;
            }

            boolean actionSupported = (action & support.getSourceDropActions()) == action;
            if (actionSupported) {
                support.setDropAction(action);
                return true;
            }

            return false;
        }

        public boolean importData(TransferHandler.TransferSupport support) {
            // if we can't handle the import, say so
            if (!canImport(support)) {
                return false;
            }
            // fetch the drop location
            JList.DropLocation dl = (JList.DropLocation) support.getDropLocation();

            int index = dl.getIndex();

            // fetch the data and bail if this fails
            String data;
            try {
                data = (String) support.getTransferable().getTransferData(DataFlavor.stringFlavor);
            } catch (UnsupportedFlavorException e) {
                return false;
            } catch (java.io.IOException e) {
                return false;
            }
            if (support.getComponent().equals(listInventory)) {
                if (data.contains("object/")) {
                    String data2 = data.substring(7);
                    new PickItem(cliente, data2);
                    return true;
                }
                if (data.contains("items/")) {
                    String data2 = data.substring(6);
                    new BuyItem(cliente, data2);
                    return true;
                }
            }
            if (support.getComponent().equals(listObject)) {
                if (data.contains("inventory/")){
                    String data2 = data.substring(10);
                    new DropItem(cliente, data2);
                    return true;
                }
            }

            return true;
        }

        public int getSourceActions(JComponent comp) {
            return COPY_OR_MOVE;
        }
        private int index = 0;

        public Transferable createTransferable(JComponent comp) {
            JList a = (JList) comp;
            String object = "";
            if (comp.equals(listInventory)) {
                object = "inventory/";

            } else if (comp.equals(listObject)) {
                object = "object/";
            }
            index = a.getSelectedIndex();
            if (index < 0 || index >= a.getModel().getSize()) {
                return null;
            }

            return new StringSelection(object + (String) a.getSelectedValue());
        }

        public void exportDone(JComponent comp, Transferable trans, int action) {
            if (action != MOVE) {
                return;
            }

            //modelObject.removeElementAt(index);
        }
    }
}
